//
//  CommonPickerCell.swift
//  EyeVisionForDoctors
//
//  Created by QDSG on 2020/3/2.
//  Copyright © 2020 tao Tao. All rights reserved.
//

import UIKit

class CommonPickerCell: UITableViewCell {
    
    static let reuseIdentifier = "commonPickerCellId"
    static let className = "CommonPickerCell"

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        titleLabel.textColor = selected ? Asset.main.color : Asset.textDark.color
    }
    
    func configure(with model: CommonPickerModel, pickType: CommonPickerViewType) {
        switch pickType {
        case .drugFrequency, .drugPosition, .drugUsing:
            titleLabel.text = model.value
        default:
            titleLabel.text = model.name
        }
    }
    
    @IBOutlet private weak var titleLabel: UILabel!
    
}
